<?php
	$mkjur=$_GET["jurusan"];
	//$matakuliah='mk'.substr($mkjur,0,3);
	$matakuliah='mk';
?>

<STYLE type=text/css>.blank {
	FONT-SIZE: 0px; WIDTH: 0px; HEIGHT: 0px
}
TD {
	FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
INPUT {
	FONT-SIZE: 12px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
.present {
	FONT-WEIGHT: bold; BACKGROUND-COLOR: #dee5ec
}
.h1 {
	FONT-WEIGHT: bold; FONT-SIZE: 12px; COLOR: #ffffff
}
.d1 {
	COLOR: #c0c0c0
}
.link {
	FONT-WEIGHT: bold; FONT-SIZE: 12px; CURSOR: hand; COLOR: #ffffff; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.footer {
	FONT-WEIGHT: normal; FONT-SIZE: 10px; COLOR: #000000; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif; TEXT-DECORATION: none
}
.footer1 {
	FONT-WEIGHT: bold; FONT-SIZE: 10px; BACKGROUND-IMAGE: url(chat/images/menu_b.gif); CURSOR: default; COLOR: #000000; BORDER-BOTTOM: 0px
}
.header {
	FONT-WEIGHT: bold; FONT-SIZE: 10px; BACKGROUND-IMAGE: url(chat/images/menu_h.gif); CURSOR: default; COLOR: #000000; BORDER-BOTTOM: 0px
}
.textcol {
	FONT-SIZE: 12px; COLOR: #2378d5; FONT-FAMILY: Verdana, Arial, Helvetica, sans-serif
}
</STYLE>

<?php
	$recno=$_GET["recno"];
	$kodemk=$_GET["kodemk"];
	$namamk=$_GET["namamk"];
    $sesi=$_GET["sesi"];
	$periode=$_GET["periode"];
	$jurusan=$_GET["jurusan"];
    $semester=$_GET["semester"];
	$kodejur=substr($jurusan,0,3);

	include("../connect.php");
	$pilih=mysql_select_db("uwika_krs",$conn);
	$sqlstr="SELECT pagu,hari,mulaipukul,selesaipukul,dosen,keterangan FROM penawaran where recno='$recno'";
	$hasil=mysql_query($sqlstr);
	$row=mysql_fetch_row($hasil);
	list($pagu,$hari,$mulaipukul,$selesaipukul,$dosen,$keterangan) = $row;
	echo "<br>";
	echo "<form name=\"frmdaftar\" method=\"post\" action=\"savepnwrn.php\">";
	echo "<table width=\"100%\" border=\"0\">";
	echo "<input type=hidden name=recno value=" . $recno . ">";
	echo "<tr><td width=\"5%\"></td><td width=\"65%\">Kode Mata Kuliah</td>";
	echo "<td width=\"2%\"> : </td>";
	echo "<td width=\"38%\">$kodemk</td><td width=\"25%\"></tr>";
	echo "<input type=hidden name=kodemk value=" . $kodemk . ">";
	echo "<tr><td></td><td>Nama Mata Kuliah</td>";
	echo "<td> : </td>";
	echo "<td>$namamk</td></tr>";
	echo "<tr><td></td><td>Jurusan</td>";
	echo "<td> : </td>";
	echo "<td>$jurusan</td></tr>";
	echo "<input type=hidden name=kodejur value=" . $jurusan . ">";
	echo "<tr><td></td><td>Semester</td>";
	echo "<td> : </td>";
	echo "<td>$semester</td></tr>";
	echo "<input type=hidden name=txtsemester value=" . $semester . ">";
	echo "<tr><td></td><td>Periode</td>";
	echo "<td> : </td>";
	echo "<td>$sesi / $periode</td></tr>";
	echo "<input type=hidden name=sesi value=" . $sesi . ">";
	echo "<input type=hidden name=periode value=" . $periode . ">";
	echo "<tr><td></td><td>Hari</td>";
	echo "<td> : </td>";
	echo "<td><select name=\"sel_hari\">";
	if ($hari=='SENIN') {
		echo "<option selected>SENIN</option>";
	} else {
		echo "<option>SENIN</option>";
	}
	if ($hari=='SELASA') {
		echo "<option selected>SELASA</option>";
	} else {
		echo "<option>SELASA</option>";
	}
	if ($hari=='RABU') {
		echo "<option selected>RABU</option>";
	} else {
		echo "<option>RABU</option>";
	}
	if ($hari=='KAMIS') {
		echo "<option selected>KAMIS</option>";
	} else {
		echo "<option>KAMIS</option>";
	}
	if ($hari=='JUMAT') {
		echo "<option selected>JUMAT</option>";
	} else {
		echo "<option>JUMAT</option>";
	}
	if ($hari=='SABTU') {
		echo "<option selected>SABTU</option>";
	} else {
		echo "<option>SABTU</option>";
	}
	if ($hari=='BEBAS') {
		echo "<option selected>BEBAS</option>";
	} else {
		echo "<option>BEBAS</option>";
	}
	echo "</select></td></tr>";
	echo "<tr><td></td><td>Mulai Pukul</td>";
	echo "<td> : </td>";
	echo "<td><input name=\"txtmulaipukul\" type=\"text\" value=\"$mulaipukul\" maxlength=\"8\" size=\"8\"> WIB</td></tr>";
	echo "<tr><td></td><td>Selesai Pukul</td>";
	echo "<td> : </td>";
	echo "<td><input name=\"txtselesaipukul\" type=\"text\" value=\"$selesaipukul\" maxlength=\"8\" size=\"8\"> WIB</td></tr>";
	echo "<tr><td></td><td>Kuota Kelas</td>";
	echo "<td> : </td>";
	echo "<td><input name=\"txtpagu\" type=\"text\" value=\"$pagu\" maxlength=\"3\" size=\"3\"> mahasiswa</td></tr>";
	echo "<tr><td></td><td>Dosen Pengajar</td>";
	echo "<td> : </td>";
	echo "<td><input name=\"txtdosen\" type=\"text\" value=\"$dosen\" maxlength=\"50\" size=\"50\"></td></tr>";
	echo "<tr><td></td><td>Keterangan</td>";
	echo "<td> : </td>";
	echo "<td><input name=\"txtketerangan\" type=\"text\" value=\"$keterangan\" maxlength=\"100\" size=\"100\"></td></tr>";
	echo "<tr><td>&nbsp;</td></tr>";
	echo "<tr><td></td><td></td><td></td><td>";
	echo "<table border=0><tr><td><input name=\"cmdSimpan\" type=\"submit\" value=\"Simpan\">";
	echo "</form></td>";
	echo "<form name=\"frmhapus\" method=\"post\" action=\"delpnwrn.php\">";
	echo "<input type=hidden name=recno value=" . $recno . ">";
	echo "<input type=hidden name=kodemk value=" . $kodemk . ">";
	echo "<input type=hidden name=txtsemester value=" . $semester . ">";
	echo "<input type=hidden name=sesi value=" . $sesi . ">";
	echo "<input type=hidden name=periode value=" . $periode . ">";
	echo "<input type=hidden name=kodejur value=" . $jurusan . ">";
	echo "<td><input name=\"cmdHapus\" type=\"submit\" value=\"Hapus\">";
	echo "<input type=\"button\" value=\"Batal\" onClick=\"javascript: history.go(-1)\">";
	echo "</form></td></table></td></tr></table>";
	echo "<br><br>";
	mysql_close($conn);
?>